package com.zeen.zl.service;

import com.zeen.zl.dao.UserDao;
import com.zeen.zl.domain.User;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 *
 * @author  Z.L.G
 */
@Service("userService")
@MapperScan(basePackages = "com.zeen.zl.dao")
public class UserServiceImpl implements IUserService {
    @Autowired(required=false)
    private UserDao userDao;

    @Override
    public void save(User user) {
        userDao.insertUser(user);
    }

    @Override
    public User get(Long id) {
        return userDao.getUserById(id);
    }
}
